#ifndef QxWorkspaceIO_HPP
#define QxWorkspaceIO_HPP

#include "QxAbstractDatabaseIO.hpp"

#include "QxWorkspaceDefine.hpp"
#include "QxWellInfoDefine.hpp"

#include <QVector>
#include <QStringList>

class QxWorkspaceIO : public QxAbstractDatabaseIO
{
  Q_OBJECT

public:

  QxWorkspaceIO( const QSqlDatabase& database=QSqlDatabase() );
  virtual ~QxWorkspaceIO();

  const QString& workspaceName() const;
  void setWorkspaceName( const QString& );

  QxWorkspaceDefine workspaceDefine() const;
  void setWorkspaceDefine( const QxWorkspaceDefine& );

  QVector<QxWellInfoDefine> wellInfoDefines() const;
  bool insertWellInfoDefine( const QxWellInfoDefine& );
  bool removeWellInfoDefine( const QxWellInfoDefine& );

  QStringList queryWellNames() const;

  static void createTable( const QSqlDatabase& );

protected:

  virtual void init();

private:

  class QxWorkspaceIOPrivate;
  QScopedPointer<QxWorkspaceIOPrivate>         _pd;
};

#endif // QXWORKSPACEIO_HPP
